from django.shortcuts import render,render_to_response
from django.http import HttpResponse
# Create your views here.

def index(request,offset):
	return HttpResponse("Hello,Django!")


def testname(request,offset):
	print request.method
	return HttpResponse("Hello,Django url name")


database={"lili":'123456'}

def login(request,name=None,password=None):
	if name == None and password == None:
		return render_to_response('test.html')
	else:
		if name in database.keys():
			if database[name] == password:
				return HttpResponse("login success")
		else:
			return HttpResponse('login fail')
